//book.js
exports.name = "Node.js示例";
exports.read = function () {
    return `我正在读《${exports.name}》!`;
};

var ratePoints = 0;
exports.rate = function (points) {
    ratePoints = points;
}

exports.getPoints = function () {
    return ratePoints;
}

exports.Book = function () {
    var ratePoints = 0;
    return {
        rate: function (points) {
            ratePoints = points;
        },

        getPoints: function () {
            return ratePoints;
        }
    }
}